home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: 500 MB Amiga Software / 500 MB Amiga Software - Euber 130 - Amiga Games Disc & Mag.iso / userbox / publicdomain / amigafax / install < prev    next >
AmigaDOS Script File  |  1994-03-16  |  7KB  |  288 lines

  1. .key idir,p2,p3,p4,p5,p6,p7,p8
  2. .bra {
  3. .ket }
  4.  
  5. ; AmigaFax Install script.
  6. ;
  7. ; USAGES:   Double click the Install_Now (or Install_Demo) icon,
  8. ;               or click it once then double click the destination drawer.
  9. ;
  10. ;  In a Shell window, change to the appropriate directory,
  11. ;          eg    cd df0:AFaxDemo
  12. ;            or  cd df0:AmigaFax
  13. ;            then type either
  14. ;                install disk:drawer
  15. ;            or  install
  16.  
  17. assign AmiFax: ""
  18.  
  19. if not "{idir}" eq ""
  20.   if not "{idir}" eq "afax:"
  21.  
  22.     if "{idir}" eq "q"
  23.       echo "Installation cancelled."
  24.       skip to_end
  25.     endif
  26.   
  27.     if "{idir}" eq "n"
  28.       echo "Installation cancelled."
  29.       skip to_end
  30.     endif
  31.   
  32.     if not "{p2}" eq ""
  33.       echo "*N*N*N **** ERROR ****  No double quotes around: {idir} {p2}..."
  34.       skip to_redo
  35.     endif
  36.   
  37.     echo >ram:faxfname {idir}
  38.     search >nil: ram:faxfname ":"
  39.     if warn
  40.       delete >nil: ram:faxfname
  41.       echo "*N*N*N **** ERROR ****  Missing *":*" in {idir}."
  42.       skip to_redo
  43.     endif
  44.     delete >nil: ram:faxfname
  45.  
  46.     if exists "{idir}"
  47.       echo "*N{idir} already exists!"
  48.       ask "Assign afax: to it and continue (y/n)?"
  49.       if not warn
  50.         skip to_redo
  51.       endif
  52.       assign afax: "{idir}"
  53.       if not exists {idir}.info
  54.         if exists AmiFax:/AmigaFax.info
  55.           copy >nil: AmiFax:/AmigaFax.info {idir}.info nopro
  56.     else
  57.           if exists AmiFax:/AFaxDemo.info
  58.             copy >nil: AmiFax:/AFaxDemo.info {idir}.info nopro
  59.       else
  60.             copy >nil: AmiFax:docs.info {idir}.info nopro
  61.           endif
  62.         endif
  63.       endif
  64.       skip to_install
  65.     else
  66.       ask "*NCreate {idir}, assign afax: to it and continue (y/n)?"
  67.       if not warn 
  68.         skip to_redo
  69.       endif
  70.       makedir {idir}
  71.       if warn 
  72.         skip to_redo
  73.       endif
  74.       if exists AmiFax:/AmigaFax.info
  75.         copy >nil: AmiFax:/AmigaFax.info {idir}.info nopro
  76.       else
  77.         if exists AmiFax:/AFaxDemo.info
  78.           copy >nil: AmiFax:/AFaxDemo.info {idir}.info nopro
  79.         else
  80.           copy >nil: AmiFax:docs.info {idir}.info nopro
  81.         endif
  82.       endif
  83.       assign afax: "{idir}"
  84.       skip to_install
  85.     endif
  86.   endif
  87. endif
  88.  
  89.  
  90. assign >nil: afax: exists  
  91. if not warn
  92.   echo "*NThe existing afax assignment is:"
  93.   assign afax: exists
  94.   ask "Do you want to install AmigaFax in this directory (y/n)? "
  95.   if warn
  96.     skip to_install
  97.   endif
  98. endif
  99. skip to_redo
  100.  
  101. lab to_install
  102.  
  103. echo "*NDirectory afax:s"
  104. if exists afax:s
  105.   copy AmiFax:s afax:s nopro
  106.   echo "The Afax:s directory already existed!"
  107.   echo "NOT overwriting files you may have edited:"
  108.   dir AmiFax:s.user
  109.   wait 5 secs
  110. else
  111.   copy AmiFax:s afax:s nopro
  112.   copy AmiFax:s.user afax:s nopro
  113. endif
  114. protect >nil: afax:s/AFAX-Startup +s
  115.  
  116. delete afax:s/User-Startup
  117. echo >ram:fstart "assign afax: {idir}"
  118.  
  119. assign >nil: uucp: exists
  120. if not warn
  121.   join ram:fstart AmiFax:s/User-Startup as afax:s/User-Startup
  122. else
  123.   join ram:fstart AmiFax:s/User-Startup AmiFax:s/UUCPStart as afax:s/User-Startup
  124. endif
  125.  
  126. delete ram:fstart
  127.  
  128. echo  "*NDirectory afax:lib"
  129. if exists afax:lib
  130.   if exists AmiFax:lib
  131.     copy AmiFax:lib afax:lib nopro
  132.   endif
  133.   echo "The afax:lib directory already exists!"
  134.   echo "NOT overwriting files you may have edited:"
  135.   dir AmiFax:lib.user
  136.   wait 5 secs
  137.   if exists AmiFax:lib.user/afax.library
  138.     if exists afax:lib/afax.library
  139.       if exists afax:lib/afax.library.old
  140.         delete afax:lib/afax.library.old
  141.       endif
  142.       rename afax:lib/afax.library afax:lib/afax.library.old
  143.       copy AmiFax:lib.user/afax.library afax:lib/afax.library
  144.       echo "*NExisting Licence Library renamed afax:lib/afax.library.old"
  145.       echo "*NYou will need to flush or reboot to load new licence"
  146.       wait 2 secs
  147.     else
  148.       copy AmiFax:lib.user/afax.library afax:lib/afax.library
  149.       echo "*Nafax:lib/afax.library (Registration Library) copied"
  150.     endif
  151.   endif
  152. else
  153.   makedir afax:lib
  154.   if exists AmiFax:lib
  155.     copy AmiFax:lib afax:lib nopro
  156.   endif
  157.   copy AmiFax:lib.user afax:lib nopro
  158. endif
  159. wait 2 secs
  160.  
  161.  
  162. echo "*NDirectory afax:"
  163. copy AmiFax:#?fax#? afax: nopro
  164. copy AmiFax:READ#?  afax: nopro
  165. copy AmiFax:DEMO#?  afax: nopro
  166.  
  167. echo "*NDirectory afax:Docs"
  168. if not exists afax:Docs.info
  169.   copy AmiFax:Docs.info afax:Docs.info nopro
  170. endif
  171. copy AmiFax:Docs afax:Docs nopro
  172.  
  173. echo "*NDirectory afax:c"
  174. copy AmiFax:c afax:c nopro
  175.  
  176. echo "*NAfax Printer Driver"
  177. if exists afax:c/afax.driver
  178.   copy afax:c/afax.driver DEVS:Printers/afax.driver nopro
  179. endif
  180. if exists afax:c/afax.driver.debug
  181.   copy afax:c/afax.driver.debug DEVS:Printers/afax.driver.debug nopro
  182. endif
  183.  
  184. echo    "*NDirectory afax:libs"
  185. copy AmiFax:libs afax:libs nopro
  186.  
  187. echo "*NDirectory afax:l"
  188. copy AmiFax:l afax:l nopro
  189.  
  190. echo    "*NDirectory afax:devs"
  191. copy AmiFax:devs afax:devs nopro
  192.  
  193. echo "*NDirectory afax:faxdoc"
  194. copy AmiFax:faxdoc afax:faxdoc nopro
  195.  
  196. echo "*NDirectory afax:incoming"
  197. copy AmiFax:incoming afax:incoming nopro
  198.  
  199. echo "*NDirectory afax:spool"
  200. copy AmiFax:spool afax:spool nopro
  201.  
  202. echo "*NDirectory afax:REXX"
  203. copy AmiFax:spool afax:REXX nopro
  204.  
  205. echo "*NDirectory afax:uucp"
  206. copy AmiFax:uucp afax:uucp nopro
  207.  
  208. echo "*NDirectory afax:uucp/s"
  209. copy AmiFax:uucp/s afax:uucp/s nopro
  210.  
  211. echo "*NDirectory afax:uucp/c"
  212. copy AmiFax:uucp/c afax:uucp/c nopro
  213.  
  214. echo "*NDirectory afax:Other"
  215. copy AmiFax:Other afax:Other nopro
  216.  
  217. echo  "*NDirectory afax:uucp/lib"
  218. if exists afax:uucp/lib
  219.   echo "The afax:uucp/lib directory already exists!"
  220.   echo "NOT overwriting files you may have edited:"
  221.   dir AmiFax:uucp/lib
  222.   wait 5 secs
  223. else
  224.   copy AmiFax:uucp/lib afax:uucp/lib nopro
  225. endif
  226.  
  227. if not exists l:null-handler
  228.   ask "Install l:null-handler (y/n)?"
  229.   if warn
  230.     copy afax:l/null-handler l:
  231.   endif
  232. endif
  233.  
  234. if not exists l:fifo-handler
  235.   ask "Install fifo-handler and fifo.library (y/n)?"
  236.   if warn
  237.     copy afax:l/fifo-handler l:
  238.     copy afax:libs/fifo.library libs:
  239.   endif
  240. endif
  241.  
  242. if not exists libs:arp.library
  243.   ask "Install arp.library (y/n)?"
  244.   if warn
  245.     copy afax:libs/arp.library libs:
  246.   endif
  247. endif
  248.  
  249. if exists AmiFax:FaxFonts.run
  250.   echo "*NIf you are not using AmigaDOS2.0, you may wish to extract the"
  251.   echo "larger CM fax fonts into your FONTS: directory. Under 2.0 you can"
  252.   echo "scale standard fonts, so this is not necessary. You can do it manually"
  253.   echo "later if you want."
  254.   ask "*NDo you want the FaxFonts extracted to FONTS: (y/n)?"
  255.   if warn
  256.     cd fonts:
  257.     AmiFax:FaxFonts.run
  258.   endif
  259. endif
  260.  
  261. echo "*NDirectory afax:BBS"
  262. if not exists afax:BBS.info
  263.   if exists AmiFax:BBS.info
  264.     copy AmiFax:BBS.info afax:BBS.info nopro
  265.   endif
  266. endif
  267. if exists AmiFax:BBS
  268.   copy AmiFax:BBS afax:BBS all
  269. endif
  270.  
  271. echo "*NAFax Assigns"
  272. execute afax:s/AFaxAssign
  273.  
  274. echo "*NInstallation complete."
  275. echo "You now must edit configuration files in the s and lib directories"
  276. echo "See the README file for instructions."
  277. ask "*NPress return to continue."
  278. skip to_end
  279.  
  280. lab to_redo
  281. echo "*NEnter the name of the disk and drawer"
  282. echo "where you want to install AmigaFax.  Type a colon between"
  283. echo "disk and drawer parts and enclose it all in double quotes."
  284. echo "Example: *"Work:fax*" (q=quit): " noline
  285. execute >nil: AmiFax:install ?
  286. lab to_end
  287.  
  288.